package es.abredatos.client.view;

import com.google.gwt.event.dom.client.HasClickHandlers;
import com.google.gwt.user.client.ui.Button;
import com.google.gwt.user.client.ui.Composite;
import com.google.gwt.user.client.ui.HasText;
import com.google.gwt.user.client.ui.Label;
import com.google.gwt.user.client.ui.VerticalPanel;

import es.abredatos.client.presenter.BookPresenter;

public class BookView extends Composite implements BookPresenter.Display {

	private Label viewTitle;
	private Label bookLabel;
	private Label bookDescriptionLabel;
	private Button librariesButton;
	private VerticalPanel vPanel;

	public BookView() {

		viewTitle = new Label(getClass().getName());

		bookLabel = new Label();

		bookDescriptionLabel = new Label();

		librariesButton = new Button("Map Libraries");

		vPanel = new VerticalPanel();
		vPanel.add(viewTitle);
		vPanel.add(bookLabel);
		vPanel.add(bookDescriptionLabel);
		vPanel.add(librariesButton);

		initWidget(vPanel);
	}

	public HasText getBookTitle() {
		return bookLabel;
	}

	public HasText getBookDescription() {
		return bookDescriptionLabel;
	}

	public HasClickHandlers getLibrariesButton() {
		return librariesButton;
	}

}
